diff --git a/puppetboard/forms.py b/puppetboard/forms.py index adb6106..87e378e 100644 --- a/puppetboard/forms.py +++ b/puppetboard/forms.py @@ -1,33 +1,33 @@ from __future__ import unicode_literals from __future__ import absolute_import from flask.ext.wtf import Form from wtforms import ( HiddenField, RadioField, SelectField, TextAreaField, validators ) class QueryForm(Form): """The form used to allow freeform queries to be executed against PuppetDB.""" query = TextAreaField('Query', [validators.Required( message='A query is required.')]) endpoints = RadioField('API endpoint', choices=[ ('nodes', 'Nodes'), ('resources', 'Resources'), ('facts', 'Facts'), ('factsets', 'Fact Sets'), ('fact-paths', 'Fact Paths'), ('fact-contents', 'Fact Contents'), ('reports', 'Reports'), ('events', 'Events'), ('catalogs', 'Catalogs'), ('edges', 'Edges'), ('environments', 'Environments'), ]) class CatalogForm(Form): """The form used to compare the catalogs of different nodes.""" compare = HiddenField('compare') - against = SelectField(u'against') + against = SelectField('against') diff --git a/puppetboard/static/js/environments.js b/puppetboard/static/js/environments.js deleted file mode 100644 index bc3cca0..0000000 --- a/puppetboard/static/js/environments.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - var $; - - $ = jQuery; - - $('#switch_env').change(function() { - path = location.pathname.split('/'); - path[1] = $(this).find(':selected').text(); - location.assign(path.join('/')) - }); -}).call(this) diff --git a/puppetboard/templates/catalog.html b/puppetboard/templates/catalog.html index 11c1e16..2a71894 100644 --- a/puppetboard/templates/catalog.html +++ b/puppetboard/templates/catalog.html @@ -1,61 +1,61 @@ {% extends 'layout.html' %} {% block content %}

Summary

Hostname Version Transaction UUID
{{catalog.node}} {{catalog.version}} {{catalog.transaction_uuid}}

Resources

{% for resource in catalog.get_resources() %} {% endfor %}
Resource Location
{{resource.type_}}[{{resource.name}}] {{resource.sourcefile}}:{{resource.sourceline}}

Edges

- + {% for edge in catalog.get_edges() %} {% endfor %}
Source Relationship Target
{{edge.source}} {{edge.relationship}} {{edge.target}}
{% endblock content %} diff --git a/puppetboard/templates/catalog_compare.html b/puppetboard/templates/catalog_compare.html index 705210a..a70d8c2 100644 --- a/puppetboard/templates/catalog_compare.html +++ b/puppetboard/templates/catalog_compare.html @@ -1,87 +1,90 @@ {% extends 'layout.html' %} {% block content %} +
+ +

Comparing

Against

{{compare.node}} {{against.node}}
- + {% for resource in compare.get_resources() %} {% endfor %}
Resources
{{resource.type_}}[{{resource.name}}]
- + {% for resource in against.get_resources() %} {% endfor %}
Resources
{{resource.type_}}[{{resource.name}}]
- + {% for edge in compare.get_edges() %} {% endfor %}
Edges -> Target
{{edge.source}} {{edge.relationship}} {{edge.target}}
- + {% for edge in against.get_edges() %} {% endfor %}
Edge -> Target
{{edge.source}} {{edge.relationship}} {{edge.target}}
{% endblock content %} diff --git a/puppetboard/templates/layout.html b/puppetboard/templates/layout.html index eced57a..39f4f81 100644 --- a/puppetboard/templates/layout.html +++ b/puppetboard/templates/layout.html @@ -1,97 +1,101 @@ Puppetboard {% if config.OFFLINE_MODE %} {% else %} {% endif %} - +
v0.1.0
+
{% block content %} {% endblock content %}
{% if config.OFFLINE_MODE %} {% if config.LOCALISE_TIMESTAMP %} {% endif %} {% else %} {% if config.LOCALISE_TIMESTAMP %} {% endif %} {% endif %} {% if config.LOCALISE_TIMESTAMP %} {% endif %} - + {% block script %} {% endblock script %}